home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Networking / MoreNetworkSetup / NetworkSetup / OldStyleAPI / OldOTConfigLib.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  2.4 KB  |  64 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        OldOTConfigLib.h
  3.  
  4.     Contains:    Old interface to the OT TCP/IP and AppleTalk configurators.
  5.  
  6.     Written by:    Quinn
  7.  
  8.     Copyright:    Copyright © 1998 by Apple Computer, Inc., all rights reserved.
  9.  
  10.                 You may incorporate this Apple sample source code into your program(s) without
  11.                 restriction. This Apple sample source code has been provided "AS IS" and the
  12.                 responsibility for its operation is yours. You are not permitted to redistribute
  13.                 this Apple sample source code as "Apple sample source code" after having made
  14.                 changes. If you're going to re-distribute the source, we require that you make
  15.                 it clear in the source that the code was descended from Apple sample source
  16.                 code, but that you've made changes.
  17.  
  18.     Change History (most recent first):
  19.  
  20.          <2>     5/11/98    Quinn   Fix headers.
  21.          <1>     5/11/98    Quinn   First checked in.
  22. */
  23.  
  24. #ifndef __OLDOTCONFIGLIB__
  25. #define __OLDOTCONFIGLIB__
  26.  
  27. /* Consequences of changing configuration */
  28.  
  29. enum Consequence
  30. {
  31.     kNoAnswer        = -1,    /* Couldn't get in touch with the protocol (probably not loaded => benign)    */
  32.     kBenignChange    =  0,    /* Change won't disturb aything                                                */
  33.     kKillsServices    =  1,    /* Change will interrupt connections currently established                    */
  34.     kMustReboot        =  2    /* Change requires a reboot to take effect                                    */
  35. };
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif
  40.  
  41. extern SInt32 TCPCheckChangeConfigurationConsequences(SInt16 resFileRefNum, SInt16 configResID);
  42.     /* Check with TCP/IP what would be the consequences of changing the current                     */
  43.     /* config to the specified one.                                                                    */
  44.  
  45. extern OSErr TCPChangeConfiguration(SInt16 resFileRefNum, SInt16 configResID);
  46.     /* Makes the TCP/IP configuration the active configuration and notifies                            */
  47.     /* the protocol of this change.                                                                    */
  48.     /* The protocol will react as announced by TCPCheckChangeConfigurationConsequences                */
  49.  
  50. extern SInt32 ATCheckChangeConfigurationConsequences(SInt16 ref, SInt16 config);
  51.     /* Check with AppleTalk what would be the consequences of changing the current                     */
  52.     /* config to the specified one.                                                                    */
  53.  
  54. extern OSErr ATChangeConfiguration(SInt16 ref, SInt16 config);
  55.     /* Makes the AppleTalk configuration the active configuration and notifies                        */
  56.     /* the protocol of this change.                                                                    */
  57.     /* The protocol will react as announced by TCPCheckChangeConfigurationConsequences                */
  58.  
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62.  
  63. #endif
  64.